import 'package:getx_learn/app/modules/getx_controller_demo/modules/getconnect_page/providers/base_provider_provider.dart';
import 'package:getx_learn/app/modules/getx_controller_demo/modules/getconnect_page/providers/iweather_provider.dart';

class WeatherProvider extends BaseProviderProvider implements IWeatherProvider {
  @override
  Future<String> getWeatherInfo() async {
    var response = await get("http://t.weather.itboy.net/api/weather/city/101010100");
    return response.bodyString ?? "";
  }

  @override
  Future<String> fetchAppUpdate() async {
    var header = {"Content-Type": "application/json"};
    var body = {
      "device": "ios",
      "channel": "string",
      "architecture": "string",
      "model": "string"
    };
    var response = await post(
        "https://mock.apifox.cn/m1/1124717-0-default/app/update", body,
        headers: header);
    return response.bodyString ?? "";
  }
}
